跳到主要内容

节点只读数据(NodeReadData)

表示层级中的节点(Node),提供变换属性以及父/子节点访问能力。

字段(Fields)

position

节点本地位置(local position)。

rotation

节点本地旋转(弧度,radians)。

scale

节点本地缩放(local scale)。

worldTransform

节点世界变换(world transform)。

x

本地位置 x 坐标。

y

本地位置 y 坐标。

scaleX

本地缩放 x 分量。

scaleY

本地缩放 y 分量。

paint

当节点是 Path 时,可访问 paint trait 及其绘制数据。

方法(Methods)

asPath

当节点是 Path 时,返回 PathData

asPaint

当节点是 ShapePaint(Fill 或 Stroke)时,返回 Paint